#define NO_EXT
#include once "fbconfig.bi"

config.set_app_name("FBconfig_Test_App")
config.set_path( EXEPATH & "/array.cfg" )
config.load()

var repeat = config.get_bool("do_repeat",ext.false)

redim ints(5) as integer
for n as integer = lbound(ints) to ubound(ints)
    ints(n) = n
next

config.get_integer_array("array","test", ints() )

for n as integer = lbound(ints) to ubound(ints)
    print ints(n)
    ints(n) = ints(n) * 2
next

redim preserve ints(4)

config.set_integer_array("array","test", ints() )
if not repeat then
    config.set_bool( "do_repeat", ext.true )
else
    config.remove("do_repeat")
end if

for n as integer = lbound(ints) to ubound(ints)
    print ints(n)
next

config.remove("version")
config.set_string("version",hex(FBCONFIG_VERSION_I))
config.save()

